# #!/usr/bin/env python3
# # -*- coding: utf-8 -*-
# #
# import random
# import time
# from threading import Semaphore, current_thread, Thread
#
# # 允许同时有10把锁
# sem = Semaphore(3)
#
#
# def tesk():
#     # sem.acquire()
#     # print("{} 获取到了 ".format(current_thread().name))
#     # time.sleep(random.randint(1, 4))
#     # sem.release()
#     with sem:
#         print("{} 获取到了 ".format(current_thread().name))
#         time.sleep(random.randint(1, 4))
#
#
# if __name__ == '__main__':
#     for i in range(10):
#         t = Thread(target=tesk)
#         t.start()

ip = "10.40.1.12"
# for i in range(50000, 50061):
#     print(
#         "netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport={0} connectaddress={1} connectport={0}".format(
#             i, ip))
